﻿namespace EyeOpen.Domain
{
	using System.ComponentModel.DataAnnotations;
	using System.Xml.Linq;

	public class XmlValidator
	{
		public static ValidationResult Validate(string xml)
		{
			try
			{
				XElement.Parse(xml);
				return ValidationResult.Success;
			}
			catch
			{
				return 
					new ValidationResult("The Boby must be a valid XML.");
			}
		}
	}
}